﻿@model DiplomaWeb.Models.Developer.LogViewModel

@using(Html.BeginRouteForm("Default", new { controller = "Developer", action = "Logs"}))
{
    @Html.DropDownListFor(r => r.SelectedType, Model.Types)
    <input type="submit" value="Show" />
}

<table>
    <thead>
        <tr>
            <td>Id</td>
            <td>Message</td>
            <td>Type</td>
            <td>UserName</td>
            <td>Occured</td>
            <td>IP</td>
            <td>Browser</td>
            <td>Level</td>
            <td>Logger</td>
            <td>Exception</td>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model.Items)
        {
    
            <tr>
                <td>@item.Id</td>
                <td>@item.Message</td>
                <td>@item.Type</td>
                <td>@item.UserName</td>
                <td>@(String.Format("{0} - {1}", item.Occured.ToShortDateString(), item.Occured.ToLongTimeString()))</td>
                <td>@item.IP</td>
                <td>@item.Browser</td>
                <td>@item.Level</td>
                <td>@item.Logger</td>
                <td>@item.Exception</td>
            </tr>
        }
    </tbody>
</table>
